import { UserAuth } from '../../utils/hooks';
import NotAuth from '../../components/NotAuth';
import { Layout, Menu, Breadcrumb } from 'antd';
import DeRoleSheet from '../../components/DeRoleSheet';

const { Header, Content, Footer } = Layout;

const DePermission = () => {
  return (
    <Layout className="layout">
      <Header
        style={{
          borderRadius: '5px 5px 0px 0px',
          height: '40px',
          padding: '0px 15px',
          margin: '0px 0px',
          backgroundColor: 'white',
          textAlign: 'left',
          lineHeight: '40px',
        }}
      >
        <h3>角色权限</h3>
      </Header>
      <Content style={{ padding: '10px 0px', backgroundColor: 'white' }}>
        <div className="site-layout-content">
          <DeRoleSheet></DeRoleSheet>
        </div>
      </Content>
    </Layout>
  );
};

export default () => {
  const { authority } = UserAuth('DePermission');

  return <>{authority ? <DePermission></DePermission> : <NotAuth />}</>;
};
